home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Games / fortune / Source / Makefile < prev    next >
Encoding:
Makefile  |  1994-05-13  |  1.7 KB  |  76 lines

  1. #    @(#)Makefile    5.2 (Berkeley) 6/26/90
  2.  
  3. PROGS=    fortune strfile unstr
  4. SRCS=    fortune.c strfile.c unstr.c
  5. MAN6=    fortune.0
  6. BINOWN=    root
  7. DATFILES=fortunes.dat startrek.dat zippy.dat fortunes-o.dat
  8. DATFILESR=fortunes startrek zippy fortunes-o
  9. .SUFFIXES: .0 .6 .8 .dat
  10. VPATH=.:datfiles
  11. CFLAGS= -bsd -O2 `allArchs`
  12. LDFLAGS= -object
  13. #LIBS= -lsys_s
  14. STRIP= -s
  15. BINGRP= wheel
  16. BINMODE= 755
  17. MANOWN= root
  18. MANGRP= staff
  19. MANMODE= 664
  20.  
  21. .6.0: ; nroff -h -man $*.6 >$@
  22.  
  23. all: ${PROGS} ${MAN6} ${DATFILES}
  24.  
  25. fortune: fortune.c
  26.     $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $*.c $(LIBS)
  27.  
  28. strfile: strfile.c
  29.     $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $*.c $(LIBS)
  30.  
  31. unstr: unstr.c
  32.     $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $*.c $(LIBS)
  33.  
  34. fortunes-o.dat: fortunes-o strfile
  35.     ./strfile -rsx datfiles/$* $@
  36.  
  37. fortunes.dat: fortunes strfile
  38.     ./strfile -rs datfiles/$* $@
  39.  
  40. startrek.dat: startrek strfile
  41.     ./strfile -rs datfiles/$* $@
  42.  
  43. zippy.dat: zippy strfile
  44.     ./strfile -rs datfiles/$* $@
  45.  
  46. clean:
  47.     rm -f ${PROGS} core *.dat
  48.  
  49. cleandir: clean
  50.     rm -f ${MAN6} tags .depend
  51.  
  52. depend: ${SRCS}
  53.     mkdep -p ${CFLAGS} ${SRCS}
  54.  
  55. install:
  56.     -mkdirs -o root -g wheel -m 755 /usr/local/lib/fortune
  57.     install ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} fortune \
  58.         ${DESTDIR}/usr/local/bin
  59.     install -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} fortune.6 \
  60.         ${DESTDIR}/usr/local/man/man6/fortune.6
  61.     (cd datfiles; install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
  62.         ${DATFILESR} ${DESTDIR}/usr/local/lib/fortune)
  63.     install -o ${BINOWN} -g ${BINGRP} -m 444 ${DATFILES} \
  64.         ${DESTDIR}/usr/local/lib/fortune
  65.  
  66. lint: ${SRCS}
  67.     lint ${CFLAGS} ${LINTFLAGS} fortune.c
  68.     lint ${CFLAGS} ${LINTFLAGS} strfile.c
  69.     lint ${CFLAGS} ${LINTFLAGS} unstr.c
  70.  
  71. tags: ${SRCS}
  72.     ctags fortune.c
  73.     ctags strfile.c
  74.     ctags unstr.c
  75.     sort -o tags tags
  76.